package com.gateway.client;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Collections;
import java.util.List;

@Data
@NoArgsConstructor
public class LoginInfo {

    private String userId;

    private String userName;

    private List<Object> roles;

    private List<Object> auths;

    public LoginInfo(String userId, String userName, List<Object> roles, List<Object> auths) {
        this.userId = userId;
        this.userName = userName;
        this.roles = null == roles ? Collections.EMPTY_LIST : roles;
        this.auths = null == auths ? Collections.EMPTY_LIST : auths;
    }
}
